package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 影院列表
 * </p>
 *
 * @author ywb
 * @since 2024-03-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("cinemas")
@ApiModel(value="CinemasEntity对象", description="影院列表")
public class CinemaEntity implements Serializable {
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "影院名称")
    private String name;
    
    @ApiModelProperty(value = "影院名称")
    private String logo;

    @ApiModelProperty(value = "影院简称")
    private String shortName;

    @ApiModelProperty(value = "影院地址")
    private String addr;

    @ApiModelProperty(value = "地区编码")
    private String areaCode;

    @ApiModelProperty(value = "专资编码")
    private String zzCode;

    @ApiModelProperty(value = "经度")
    private Double lng;

    @ApiModelProperty(value = "纬度")
    private Double lat;

    @ApiModelProperty(value = "经纬度")
    private Object point;
    
    @ApiModelProperty(value = "租户ID")
    private Long tenantId;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    public LocalDateTime createdAt;
    
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    public LocalDateTime updatedAt;
    
    @TableField(select = false)
    @ApiModelProperty(value = "删除时间")
    @TableLogic(value = "null", delval = "now()")
    public LocalDateTime deletedAt;

    @TableField(exist = false)
    private Double dist;

    @TableField(exist = false)
    private CinemaExtendEntity cinemaExtend;

    @TableField(exist = false)
    private AreaEntity area;


    public CinemaEntity() {
    }
    
    public CinemaEntity(String name, String zzCode) {
        this.name = name;
        this.zzCode = zzCode;
    }
}
